package com.mccrea.pattern.prototype.deep;

import java.io.Serializable;

/**
 * @author mccrea
 * @version 1.0
 * @description:
 * @date 2021/5/7 23:46
 */
public class DeepCloneableTarget implements Serializable, Cloneable {
    private static final long serialVersionUID = 431772289817718805L;
    private String cloneName;
    private String cloneClass;

    public String getCloneName() {
        return cloneName;
    }

    public void setCloneName(String cloneName) {
        this.cloneName = cloneName;
    }

    public String getCloneClass() {
        return cloneClass;
    }

    public void setCloneClass(String cloneClass) {
        this.cloneClass = cloneClass;
    }

    public DeepCloneableTarget(String cloneName, String cloneClass) {
        this.cloneName = cloneName;
        this.cloneClass = cloneClass;
    }

    @Override
    public String toString() {
        return "DeepCloneableTarget{" +
                "cloneName='" + cloneName + '\'' +
                ", cloneClass='" + cloneClass + '\'' +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
